﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using PraxisRent.Entities;

namespace PraxisRent.Repository.Mapping
{
    public class ESTADO_CIVILMap:EntityTypeConfiguration<ESTADO_CIVIL>
    {
        public ESTADO_CIVILMap()
        {
            this.HasKey(t => t.Id);

            this.Property(t => t.Id)
                .IsRequired()
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(20);

            this.ToTable("ESTADO_CIVIL");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
        }
    }
}
